﻿using FluentValidation;
using Nop.Admin.Models.XJ;
using Nop.Core.Domain.XJ;
using Nop.Data;
using Nop.Web.Framework.Validators;

namespace Nop.Admin.Validators.XJ
{
	public partial class MaintenanceCommentValidator : BaseNopValidator<MaintenanceCommentModel>
	{
		public MaintenanceCommentValidator(IDbContext dbContext)
		{
			RuleFor(x => x.Comment).NotEmpty().WithMessage("评论不能为空");
			//RuleFor(x => x.Star).GreaterThanOrEqualTo(1).LessThanOrEqualTo(100).WithMessage("评分不能为0");

			SetDatabaseValidationRules<XJMaintenanceComment>(dbContext);
		}
	}
}